package com.cryann.mqttserver.config.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;

/**
 * @author cRyann
 * @date 2018/12/24 0024 14:52
 * @description:
 */
@Aspect
@Configuration
@Slf4j
public class NettySentAop {

    @Pointcut("execution(* io.netty.channel..*.writeAndFlush(Object))")
    public void excudeService() {
    }

    @Before("excudeService()")
    public void twiceAsOld1(JoinPoint joinPoint) {
        System.err.println("ARGS : " + Arrays.toString(joinPoint.getArgs()));
    }
}
